<!DOCTYPE html>
<html>

<head>
    <title>a</title>
    <style type="text/css">
        div {
            padding: 10px;
        }
    </style>
</head>

<body>
    <div id="div_url"></div>
    <hr />
    <div>
        <a href="javascript:;" id="a_openwin1">打开同域a.1</a>
    </div>
    <div>
        <a href="javascript:;" id="a_openwin2">打开跨域a.1</a>
    </div>
    <div>
        <a href="javascript:;" id="a_openwin3">打开a</a>
    </div>
    <hr />
    <div>
        #id1：<input type="text" id="id1" value="aaa" />
    </div>
    <div>
        #id2：<input type="text" id="id2" value="bbb" />
    </div>
    <div>
        变量var1: <span id="span_var1"></span>&nbsp;&nbsp;&nbsp;&nbsp;<a href="javascript:;"
            id="a_change_var1">修改var1的值</a>
    </div>
    <hr />
    <div>
        window.func函数：<br />
        window.func = function () {<br />
        &nbsp;&nbsp;&nbsp;&nbsp;$('#span_fun').html(jqxt.dataToStr(arguments));<br />
        }<br />
        执行结果：<span id="span_fun"></span>
    </div>
    <script src="https://cdn.bootcdn.net/npm/jquery@2.1.4/dist/jquery.min.js"></script>
    <script>
        $(document).ready(function () {
            $('#div_url').html(window.location.href);
            $('#a_openwin1').on('click', function () {
                jqxt.openWin('/page/a.1.html');
            });
            $('#a_openwin2').on('click', function () {
                jqxt.openWin('http://localhost:8889/page/a.1.html');
            });
            $('#a_openwin3').on('click', function () {
                jqxt.openWin('/page/a.html');
            });
            $('#a_change_var1').on('click', function () {
                window.var1 = Math.random();
                $('#span_var1').html(var1);
            }).trigger('click');
            window.func = function () {
                $('#span_fun').html(jqxt.dataToStr([...arguments]));
            }
        });
    </script>
</body>

</html>